package org.chengn.level_easy.context70;

/**
 * @Title: Context70
 * @Author ChengN
 * @Package org.chengn.level_easy.context70
 * @Date 2023/12/10 0:38
 * @description: 爬楼梯
 */
public class Context70 {
    public int climbStairs(int n) {
        int[] dp = new int[n + 1];
        dp[0] = dp[1] = 1;
        for (int i = 2; i <= n; ++i) {
            dp[i] = dp[i - 1] + dp[i - 2];
        }
        return dp[n];
    }
}
